package com.byxm.wlgw.control.hyzx;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.byxm.wlgw.bean.DdspxxBean;
import com.byxm.wlgw.bean.DdxxBean;
import com.byxm.wlgw.bean.YhxxBean;
import com.byxm.wlgw.control.BaseAction;
import com.byxm.wlgw.service.DdspxxService;
import com.byxm.wlgw.service.DdxxService;
import com.opensymphony.xwork2.ActionContext;



public class Ddxx_hyzxAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	private Map<String, Object> ddspxxMap;
	
	
	
	
	Map<String, Object> session;

	/**** service ****/
     DdxxService ddxxService=new DdxxService();
     DdspxxService ddspxxService=new DdspxxService();
     
     
	public String list() {
		session=ActionContext.getContext().getSession();
		if(session.get("yhxxSession")==null){
			return "index";
		}else{
			List<DdxxBean> lstDdxx;
			List<DdspxxBean> lstDdspxx;
			ddspxxMap=new HashMap<String, Object>();
	         try {
	        	YhxxBean yhxxBean=(YhxxBean)session.get("yhxxSession");
				lstDdxx=ddxxService.findDdxxlst(yhxxBean.getYhxxid());
				lstDdspxx=ddspxxService.findDdspxxlst(yhxxBean.getYhxxid());
				ddspxxMap.put("lstDdxx", lstDdxx);
				ddspxxMap.put("lstDdspxx", lstDdspxx);
			} catch (Exception e) {
				e.printStackTrace();
			} 
		}
		return "success_01";
	}
	
	
	
	
	/**********setter getter********/
	
    
	public Map<String, Object> getDdspxxMap() {
		return ddspxxMap;
	}

	public void setDdspxxMap(Map<String, Object> ddspxxMap) {
		this.ddspxxMap = ddspxxMap;
	}
	
	
}
